<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>注册页面</title>

<script type="text/javascript">
 function check(){
	 if(form1.name.value==null||form1.name.value==""){
		 alert("请输入用户名");
		 form1.focus();
		 return false;
	 }
	 if(form1.pwd.value==null||form1.pwd.value==""){
		 alert("请输入密码");
		 form1.pwd.focus();
		 return false;
	 }
	 
	 
	 if(form1.usertype.value==null||form1.usertype.value==""){
		 alert("请勾选用户类型");
		 return false;
	 }
 }
</script>
</head>
<body>
<h2>注册界面</h2>
 <form action="<%=request.getContextPath() %>/servlet/registerservlet" onsubmit="return check()" method="post" name="form1">
   输入注册用户名<input type="text" name="name"><br/>
   输入注册密码<input type="password" name="pwd"><br/>
   选择注册类型
   <input type="radio" name="usertype" value="0">管理员
   <input type="radio" name="usertype" value="1">普通用户<br/>
   <input type="submit" value="点击注册">
 </form>
 
</body>
</html>